    <?php $languages = LanguagePeer::getCulturesArray(); ?>
    <?php $tabs = false; ?>
    
    <?php foreach ($form->getWidgetSchema()->getPositions() as $name): ?>
    
      <?php $field = $form->getFormFieldSchema()->offsetGet($name); ?>
      
      <?php if (in_array($field->getName(), $languages)): ?>
      
        <?php if (!$tabs): ?>        
          <?php $tabs = true; ?>
          <ul id="language_tabs">
          <?php foreach ($languages as $language): ?>
            <li><a href="#<?php echo $language; ?>"><?php echo $language; ?></a></li>
          <?php endforeach; ?>
          </ul>
          <div style="clear:both;"></div>          
        <?php endif; ?>
        
        <div id="<?php echo $field->getName(); ?>" class="language">
          <h2><?php echo $field->getName(); ?></h2>
          <?php echo $field->renderRow(); ?>
        </div>
        
      <?php elseif(!$field->isHidden()): ?>
        <?php echo $field->renderRow(); ?>
      <?php endif; ?>
      
      <?php echo $form->renderHiddenFields(); ?>
      	
    <?php endforeach; ?>
    
    <script>
      new Control.Tabs('language_tabs');
    </script>          
